package org.batch.service.business;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 账户业务相关接口
 *
 * @author LiKun
 * @date 2021/9/29 14:23
 */
public interface AccountService {
    /**
     * 根据账户ID和交易金额更新账户余额
     *
     * @param id     账户ID
     * @param amount 交易金额
     *
     * @throws Exception 账户余额不足
     */
    void updateBalance(@NotBlank String id, @NotNull BigDecimal amount) throws Exception;
}
